package com.klikmee.sms.core.commons.events;

public interface EventDispatcher {

	/**
	 * Registers listener for specific app event
	 * 
	 * @param eventType
	 *            event type to bind listener for
	 * @param listener
	 *            listener instance
	 */
	public void registerListener(String eventType, EventListener listener);

	/**
	 * Prepares event for dispatching. Checks if event should be dispatched in
	 * same or a new thread. Delegates the actual dispatching to
	 * {@link #performDispatch(AppEvent)} method.
	 * 
	 * @param appEvent
	 * @param inSameThread
	 */
	public void dispatch(final AppEvent appEvent, boolean inSameThread);

}